package com.jimmy.ioc.condition;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @version 1.0
 * @ ClassName MyImportSelector
 * <p> TODO
 * @ author JIMMY
 * @ Date 2020/12/6 0006 下午 11:28
 */
//自定义逻辑返回需要导入的组件
public class MyImportSelector implements ImportSelector {
    public String[] selectImports(AnnotationMetadata annotationMetadata) {

        return new String[]{"com.jimmy.ioc.bean.Blue","com.jimmy.ioc.bean.Yellow"};
    }
}
